package com.book.remote;

import com.book.pojo.Category;
import com.book.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class CategoryRemoter {
    @Autowired
    private CategoryService categoryService;

    public List<Category> getCategoryList(Integer parentId){
        return categoryService.getCategoryList(parentId);
    }

    public Category getParentCategoryList(Integer cataId) {
        return categoryService.getCategoryById(cataId);
    }

}
